extends ../layout/layout
append head
  script(type="text/javascript", src="/admin/js/article.js")
block main
  .p10
    h3 文章
    .list_style_02
      .page_box.tr
        form(action="", method="get")
          a(href="?p=1", title).fb.f-14 «
          a(href="?p=#{page-1>0?page-1:1}", title).fb.f-14 ‹
          span.pl5 第
          input(name="p", value="#{page}").tc
          span.pl5 页，共#{pages}页
          a(href="?p=#{page+1<pages?page+1:pages}", title).fb.f-14 ›
          a(href="?p=#{pages}", title).fb.f-14 »
      table.w
        thead
          tr
            th(width="33").tc
              input(type="checkbox",check_all="input[name^=del_id]").vm
            th.tl 标题
            th(width="122").tl 发布时间
            th(width="122").tl 操作
        tbody
        each article in articleList
          tr
            td.tc
              input(type="checkbox", value="#{article._id}", name="del_id[]").vm
            td
              a(href="/admin/article/edit/#{article._id}", title="") #{article.title}
            td #{article.createdAt.Format('yyyy-MM-dd')}
            td
              a(href="/admin/article/edit/#{article._id}", title="编辑").fa-edit
              a(href="/admin/article/delete/#{article._id}", title="删除").fa-trash-o.ml10

